<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Retenci&oacute;n de IVA</title>

<link href="estilacho.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style12 {font-weight: bold}
.Estilo1 {color: #FFFFFF}
a:link {
	color: #993300;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #993300;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
	color: #FF0000;
}
-->
</style>
</head>

<body>
<?
include 'conexion.php';
	extract($_POST);
    extract($_GET);
/*$base= "ucg - copia";
	$conexion = mysql_connect("localhost","root","");
		mysql_select_db($base,$conexion);*/
        	 
    $sql2="Select * from items where nombre_item='Nombre'";
	$resultado2 = mysql_query($sql2, $conexion);
	$items = mysql_fetch_array($resultado2);  
	
	$sql3="Select * from items where nombre_item='RIF'";
	$resultado3 = mysql_query($sql3, $conexion);
	$items3 = mysql_fetch_array($resultado3);  
	
	$sql4="Select * from items where nombre_item='Direccion'";
	$resultado4 = mysql_query($sql4, $conexion);
	$items4 = mysql_fetch_array($resultado4); 
	
	
	$sql5="Select * from items where nombre_item='Director'";
	$resultado5 = mysql_query($sql5, $conexion);
	$items5 = mysql_fetch_array($resultado5); 
	
	$sql6="Select * from items where nombre_item='Administrador'";
	$resultado6 = mysql_query($sql6, $conexion);
	$items6 = mysql_fetch_array($resultado6); 
	
	$sql7="Select * from items where nombre_item='Asistente'";
	$resultado7 = mysql_query($sql7, $conexion);
	$items7 = mysql_fetch_array($resultado7); 
	
	$unico1="SELECT max(cod_iv) from iva";
	$unicoc1 = mysql_query($unico1, $conexion); 
	$unicocg1= mysql_fetch_array($unicoc1);
	if($unicocg1[0]==""){
	$codigo=1; }
	if ($unicocg1[0]<>""){
	$codigo=$unicocg1[0]+1;}
	echo $codigo; ?>
    
<form name="form1" method="post" action="retencioniva1.php">
  <table width="50%"  border="0" align="center">
    <tr>
      <th colspan="6" bordercolor="#FFFFFF">RETENCION DEL IMPUESTO AL VALOR AGREGADO</th>
    </tr>
    <tr>
      <td width="33%" bordercolor="#FFFFFF">&nbsp;</td>
      <td width="2%" bordercolor="#FFFFFF">&nbsp;</td>
      <td width="15%" bordercolor="#FFFFFF" class="style9 Estilo1">.........................</td>
      <td width="27%" bordercolor="#000000"><span class="style6">NRO. COMPROBANTE
            <input name="cod" type="hidden" id="cod" value="0">
            <input name="codigo" type="hidden" id="codigo" value="<? echo $codigo; ?>">
      </span></td>
      <td width="3%" bordercolor="#FFFFFF"><span class="style6"></span></td>
      <td width="20%" bordercolor="#000000"><div align="center" class="style6">1. FECHA
              <input name="fec" type="text" class="entrada" id="fec" value="<? echo date('Y-m-d')?>" >
      </div></td>
    </tr>
    <tr bordercolor="#FFFFFF">
      <td colspan="6">&nbsp;</td>
    </tr>
    <tr>
      <td bordercolor="#000000"><span class="style6">2. NOMRE O RAZON SOCIAL DE AGENTE DE RETENCI&Oacute;N
            <input name="nombre1" type="text" class="entrada" id="nombre1" value="<? echo $items[1] ?>" size="50">
      </span></td>
      <td bordercolor="#FFFFFF"><span class="style6"></span></td>
      <td colspan="2" bordercolor="#000000"><span class="style6">3. REGISTRO DE INFORMACI&Oacute;N DEL AGENTE DE RETENCI&Oacute;N
            <input name="rif1" type="text" class="entrada" id="rif1" value="<? echo $items3[1] ?>">
      </span></td>
      <td bordercolor="#FFFFFF"><span class="style6"></span></td>
      <td bordercolor="#000000"><span class="style6">4. PERIODO FISCAL
            <input name="periodo" type="text" class="entrada" id="periodo"value="<? echo date('Y')?>">
      </span></td>
    </tr>
    <tr bordercolor="#FFFFFF">
      <td colspan="6">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="4" bordercolor="#000000"><span class="style6"></span><span class="style6"></span><span class="style6">5. DIRECCI0N FISCAL DEL AGENTE DE RETENCI&Oacute;N
          <input name="dir" type="text" class="entrada" id="dir" value="<? echo $items4[1] ?>" size="100" maxlength="200">
      </span></td>
      <td bordercolor="#FFFFFF"><span class="style6"></span></td>
      <td bordercolor="#FFFFFF"><span class="style6"></span></td>
    </tr>
    <tr bordercolor="#FFFFFF">
      <td colspan="6">&nbsp;</td>
    </tr>
    <tr>
      <td height="35" bordercolor="#000000"><span class="style6">6. NOMBRE O RAZON SOCIAL DEL SUJETO RETENIDO
             <? $sql="Select * from proveedor order by emp";
	     $resultado = mysql_query($sql, $conexion); ?>
	         <span class="style12">
	         <select name="rif" class="combobox" id="rif">
             <option value="">SELECCIONE UN PROVEEDOR</option>
		     <? while ($busqueda = mysql_fetch_array($resultado)) { ?>
		     <option value="<? echo $busqueda[2];  ?>" ><? echo $busqueda[1];?></option>
             <? } ?>
           </select>
	         </span>		<? /*echo "<a href='proveedores.php?&sesion=".$sesion."'><img src='prov.jpg' alt='Registrar Proveedor' width='42' height='31' align='absmiddle'> Registrar Proveedor (solo si no existe el proveedor)</a></font>" */?>
      </span></td>
      <td bordercolor="#FFFFFF"><span class="style6"></span></td>
      <td colspan="2" bordercolor="#000000"><span class="style6">REGISTRO DE INFORACI&Oacute;N FISCAL DEL SUJETO RETENIDO (RIF)
            
      </span></td>
      <td bordercolor="#FFFFFF"><span class="style6"></span></td>
      <td bordercolor="#FFFFFF"><span class="style6"></span></td>
    </tr>
  </table>
  <table width="50%" border="0" align="center">
    <tr bordercolor="#000000">
      <td width="30%"><div align="left">Elaborado por: </div></td>
      <td width="40%"><div align="left">Revisado por:</div></td>
      <td width="40%"><div align="left">Aprobado por: </div></td>
    </tr>
    <tr bordercolor="#FFFFFF">
      <td><div align="left"><span class="style6">
        <input name="elab" type="text" class="entrada" id="elab" value="<? echo $items7[1] ?>" size="35" maxlength="40">
      </span></div></td>
      <td><div align="left"><span class="style6">
        <input name="adm" type="text" class="entrada" id="adm" value="<? echo $items6[1] ?>" size="35" maxlength="40">
      </span></div></td>
      <td><div align="left"><span class="style6">
        <input name="jef" type="text" class="entrada" id="jef" value="<? echo $items5[1] ?>" size="40" maxlength="45">
      </span></div></td>
    </tr>
    <tr bordercolor="#FFFFFF">
      <td><div align="left">Asistente Administrativo</div></td>
      <td><div align="left">Administradora</div></td>
      <td><div align="left">Jefe de la Unidad </div></td>
    </tr>
    <tr bordercolor="#FFFFFF">
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
  <div align="center">
  <input name="pro" type="submit" class="boton" value="Procesar" id="pro">
  </div>
</form>
<div align="center"><a href="index1.php">Menu principal</a>&nbsp;&nbsp;<a href="consulta_iva_gen0.php">Consultar Modificar y Eliminar</a></div>

</body>
</html>
